1. Field of the Invention
The present invention relates to optical media devices. More specifically, the present invention discloses a method that enables an optical media drive to detect, and hence configure for, the optical media that is disposed within the device drive.
2. Description of the Prior Art
In the field of permanent memory storage systems, optical media, and the drives that are capable of reading the media, are currently offered in a plethora of standards. For example, the digital video disk (DVD) model includes DVDxe2x88x92ROM, DVDxe2x88x92RW, DVD+RW, DVDxe2x88x92R, DVD+R and DVDxe2x88x92RAM formats. Please refer to FIG. 1. FIG. 1 is a simple block diagram of a prior art optical disk drive 1. The disk drive 1 contains a platter 2 which is designed to accept an optical disk 2d. The disk 2d is a carrier for an optical media that has a particular optical media format 2f. As noted above, such formats can include DVDxe2x88x92ROM, DVDxe2x88x92RW, DVD+RW, DVDxe2x88x92R, DVD+R and DVDxe2x88x92RAM formats. A spindle motor 4 is used to spin the disk 2, and a read/write head 6 is used to read data from, or write data to, the disk 2d. A controller 8 controls both the spindle motor 4 and the read/write head 6. The controller 8 sets up various configuration parameters 8p that are related to the disk 2d to enable the drive 1 to properly and efficiently utilize the disk 2d. There is a great deal of overlap in terms of data structure on these various optical media formats 2f. For example, each of these formats 2f contains space allocated on the optical media of the disk 2d from physical sector number (PSN) 0x2F200h to PSN 0x2FE00h for a so-called Control Data Zone. There is, nonetheless, quite a bit of variation as well. For example, although space is allocated for the Control Data Zone, not all of these formats 2f will actually contain useful data in the Control Data Zone, which is true in particular of the DVDxe2x88x92RW format, and certain versions of the DVDxe2x88x92R format. Blank areas on the optical disk 2 will typically cause the read/write head 6 to hang when attempting to read such blank areas. Hence, an optical disk drive 1 that is expecting to read configuration data from the Control Data Zone may obtain a read failure, and hence hang, when attempting to read a DVDxe2x88x92RW disk 2d, as the Control Data Zone on DVDxe2x88x92RW type optical media formats 2f is frequently embossed blank. Moreover, the End PSN of the data area on an optical media can vary from disk 2d to disk 2d. Areas on the optical media beyond this End PSN are frequently blank, and so will causes the read/write head 6 to hang if it ventures into such areas in a read operation. It is therefore essential to get the End PSN for a disk 2d to prevent the read/write head 6 from attempting to read too far into the disk 2d, as such areas are typically blank, and thus can lead to hanging. However, the End PSN value will vary in location from media format 2f to media format 2f, further increasing the chances the drive 1 will have incorrect configuration parameters 8p, and hence be more prone to hanging. Finally, simply in terms of maximizing drive performance by tuning the drive 1 to the particular media format 2f that is currently being read from/written to (i.e., having proper configuration parameters 8p), it is essential that the drive 1 properly identify the media format 2f of the disk 2d in the platter 2.
It is therefore a primary objective of this invention to provide a media recognition control method that is applicable to optical disk drives, and which enables optical drives to properly detect, and hence configure for, various optical media types and formats.
Briefly summarized, the preferred embodiment of the present invention discloses a method for enabling a drive controller to recognize a media type. The drive controller is capable of reading information from an optically encoded disk. The drive controller is made to attempt a first read operation from a first area of the optically encoded disk to generate a first data set. If the first read operation is successful, the drive controller then verifies that the first data set conforms to a first data format. A media type descriptor is obtained from the first data set if the first data set conforms to the first data format. A media type descriptor is obtained from a second data set read from a second area of the optically encoded disk if the first data set does not conform to the first data format, or if the first read operation is not successful.
It is an advantage of the present invention that by performing sequential read operations from the disk in the prescribed manner, and by verifying that the read operations conform to an expected data format, the drive controller is able to properly identify the media type being utilized, and hence properly configure itself for the media being used, and avoid over-read operations into blank areas of the disk. Hanging of the drive is thereby prevented, and superior tuning for the disk being read from/written to is made possible.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment, which is illustrated in the various figures and drawings.